import { createRouter,createWebHashHistory } from "vue-router";



const Login = ()=> import("../views/Login.vue")
const UserCenter = ()=> import("../views/user-center/Index.vue")
const Mine = ()=> import("../views/user-center/Mine.vue")
const SetMine = ()=> import("../views/user-center/SetMine.vue")

const routes = [
    { path: '/', 
      // component: Login
      redirect: '/login'
    },
    { path: '/login', 
      component: Login 
    },
    { path: '/user', 
      component: UserCenter,
      redirect:'/user/mine',
      children:[
        {
          path:'mine',
          component: Mine
        },
        {
          path:'set',
          component: SetMine
        },
        
      ] 
    },
    
  ]

  const router = createRouter({
    history: createWebHashHistory(),
    routes, // `routes: routes` 的缩写
  })

  export default router